package com.cxl.price.bean;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.summer.core.common.BeanName;
import com.summer.core.entity.BaseBean;
@Entity
@BeanName("淘宝类目")
public class ItemCat extends BaseBean{

	private static final long serialVersionUID = 3326121245534879013L;
	private Long cid;
	private Boolean is_parent;
	private ItemCat itemCat;
	private String name;
	private Long sortOrder;
	private String status;
	private Set<Brand> brands;
	
	@OneToMany(mappedBy = "itemCat", fetch = FetchType.LAZY)
	public Set<Brand> getBrands() {
		return brands;
	}
	public void setBrands(Set<Brand> brands) {
		this.brands = brands;
	}
	public Long getCid() {
		return cid;
	}
	public void setCid(Long cid) {
		this.cid = cid;
	}
	public void setIs_parent(Boolean isParent) {
		is_parent = isParent;
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch = FetchType.LAZY)
	@JoinColumn(name = "parent_id")
	public ItemCat getItemCat() {
		return itemCat;
	}
	public void setItemCat(ItemCat itemCat) {
		this.itemCat = itemCat;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getSortOrder() {
		return sortOrder;
	}
	public void setSortOrder(Long sortOrder) {
		this.sortOrder = sortOrder;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Boolean getIs_parent() {
		return is_parent;
	}
	
	
	
}
